"use strict"

var kk={
    name:"恺恺",
    birth:1999,
    age: function(){
        let x = new Date().getFullYear();
        return x-this.birth;
    }
}
console.log(kk.age);
console.log(kk.age());


function getAge(){
    console.log(this);
    let a = new Date().getFullYear();
    return a-this.birth;
}

let shuishui={
    name:"淼淼",
    birth:2000,
    age:getAge
}

console.log(getAge.apply(shuishui));
console.log(getAge.call(shuishui));



var count = 0;
var oldParseInt = parseInt; // 保存原函数

window.parseInt = function () {
    count += 1;
    return oldParseInt.apply(null, arguments); // 调用原函数
};
// 测试:
parseInt('10');
parseInt('20');
console.log('count = ' + count); 